import fetch from 'common/src/utils/fetch';
// let apiPrefix = '/dev';
let apiPrefix = '/api/arrangementservice/';
/**
 * 分页查询
 * @param {data} data
 */
export function findListPage(data) {
  return fetch({
    url: apiPrefix + 'progressAuditTeacher/page',
    method: 'post',
    headers: { 'Content-Type': 'application/json' },
    data: data
  })
}

/**
 * 新增
 */
export function addAuditTeacher(data) {
  return fetch({
    url:apiPrefix + 'progressAuditTeacher/addAuditTeacher',
    method: 'post',
    headers: { 'Content-Type': 'application/json' },
    data: data
  })
}

/**
 *修改
 * @param data
 */
export function updateAuditTeacher(data) {
  return fetch({
    url:apiPrefix + 'progressAuditTeacher/updateAuditTeacher',
    method: 'post',
    headers: { 'Content-Type': 'application/json' },
    data: data
  })
}

/**
 *导出
 * @param data
 */
export function exportExcel(data) {
  return fetch({
    url:apiPrefix + 'progressAuditTeacher/export',
    method: 'post',
    headers: { 'Content-Type': 'application/json' },
    data: data
  })
}

/**
 * 查询
 * @param data
 */
export function getAuditTeacherById(id) {
  return fetch({
    url:apiPrefix + 'progressAuditTeacher/getAuditTeacherById?id='+id,
    method: 'get'
  })
}

/**
 * 删除
 * @param id
 */
export function deleteAuditTeacher(id) {
  return fetch({
    url:apiPrefix + 'progressAuditTeacher/deleteAuditTeacher?id='+id,
    method: 'get'
  })
}

/**
 * 批量删除
 * @param id
 */
export function deleteTeacherList(idList) {
  return fetch({
    url:apiPrefix + 'progressAuditTeacher/deleteTeacherList',
    method: 'post',
    data:{
      ids:idList
    }
  })
}

/**
 * 批量新增
 * @param data
 */
export function batchAddTeacher(data) {
  return fetch({
    url:apiPrefix + 'progressAuditTeacher/batchAddTeacher',
    method: 'post',
    headers: { 'Content-Type': 'application/json' },
    data: data
  })
}


export default {
  findListPage,
  addAuditTeacher,
  batchAddTeacher,
  updateAuditTeacher,
  exportExcel,
  getAuditTeacherById,
  deleteTeacherList,
  deleteAuditTeacher
}


